package clientmain;


import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;

public class DynamicClient {
	public static void main(String[] args) {
		JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); 
		Client client = dcf.createClient("http://10.71.58.54:9999/hysoft?wsdl");
		System.out.println(client);
		Object[] res = null;
		try {
			res = client.invoke("sayHi","kk");
//			res = client.invoke("getCatsByUser","孙悟空");
//			res = client.invoke("getAllCats1");
//			res = client.invoke("getAllCats2");
//			res = client.invoke("getAllCats3");
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("Echo response: " + res[0].toString());
	}
}
